﻿function UploadAjax(inputfile, urlajax, response) {
    var datafile = new FormData();
    var files = inputfile.get(0).files;
    //// Add the uploaded image content to the form data collection
    if (files.length > 0) {
        datafile.append("File", files[0]);
    }
    // Make Ajax request with the contentType = false, and procesDate = false
    $.ajax({
        type: "POST",
        url: urlajax,
        contentType: false,
        processData: false,
        data: datafile,
        success: response
    });
}